import { Module } from "@nestjs/common"
import { MongooseModule } from "@nestjs/mongoose"
import { GoodsController } from "./goods.controller"
import { GoodsSchema } from "./goods.schema"
import { GoodsService } from "./goods.service"

@Module({
    imports: [MongooseModule.forFeature([
        {
            name: 'Goods', // 需要个schema名称对应
            schema: GoodsSchema, // 引入的schema
            collection: 'goods' // 数据库名称
        }
    ])],
    controllers: [GoodsController],
    providers: [GoodsService]
})

export class GoodsModule {}
